The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Webservice::OVH::Order::Cart::Item

SYNOPSIS

use Webservice::OVH;

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

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

my $items = $cart->items;

DESCRIPTION

Provides info for a specific cart item.

METHODS

_new

Internal Method to create the Item object. This method is not ment to be called directly.

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

  • Return: Webservice::OVH::Order::Cart

  • Synopsis: Webservice::OVH::Order::Cart->_new($ovh_api_wrapper, $cart_id, $module);

is_valid

When the item is deleted on the api side, this method returns 0.

  • Return: VALUE

  • Synopsis: print "Valid" if $item->is_valid;

_is_valid

Intern method to check validity. Difference is that this method carps an error.

  • Return: VALUE

  • Synopsis: $item->_is_valid;

_is_valid

Gets the associated cart.

id

Returns the api id.

  • Return: VALUE

  • Synopsis: my $id = $item->id;

properties

Retrieves properties. This method updates the intern property variable.

  • Return: HASH

  • Synopsis: my $properties = $item->properties;

configurations

Exposed property value.

  • Return: ARRAY

  • Synopsis: my $configurations = $item->configurations;

duration

Exposed property value.

  • Return: VALUE

  • Synopsis: my $duration = $item->duration;

offer_id

Exposed property value.

  • Return: VALUE

  • Synopsis: my $offer_id = $item->offer_id;

options

Exposed property value.

  • Return: HASH

  • Synopsis: my $options = $item->options;

prices

Exposed property value.

  • Return: HASH

  • Synopsis: my $prices = $item->prices;

product_id

Exposed property value.

  • Return: VALUE

  • Synopsis: my $product_id = $item->product_id;

settings

Exposed property value.

  • Return: HASH

  • Synopsis: my $settings = $item->settings;

available_configuration

Exposed property value.

  • Return: ARRAY

  • Synopsis: my $available_configuration = $item->available_configuration;

delete

Deletes the item and sets the object to invalid.

  • Synopsis: $item->delete;