NAME

Webservice::OVH::Email::Domain::Domain::Account

SYNOPSIS

use Webservice::OVH;

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

my $email_domain = $ovh->email->domain->domain('testdomain.de');

my $account = $email_domain->new_account( account_name => 'testaccount', password => $password, description => 'a test account', size => 50000000 );

DESCRIPTION

Provides access to email accounts.

METHODS

_new_existing

Internal Method to create an Account object. This method should never be called directly.

  • Parameter: $api_wrapper - ovh api wrapper object, $module - root object, $domain - parent domain Objekt, $account_name => unique name

  • Return: Webservice::OVH::Email::Domain::Domain::Account

  • Synopsis: Webservice::OVH::Email::Domain::Domain::Account->_new_existing($ovh_api_wrapper, $domain, $account_name, $module);

_new

Internal Method to create the Account object. This method should never be called directly.

  • Parameter: $api_wrapper - ovh api wrapper object, $module - root object, $domain - parent domain, %params - key => value

  • Return: Webservice::OVH::Email::Domain::Domain::Account

  • Synopsis: Webservice::OVH::Email::Domain::Domain::Account->_new($ovh_api_wrapper, $domain, $module, account_name => $account_name, password => $password, description => $description, size => $size );

is_valid

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

  • Return: VALUE

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

name

Unique identifier.

  • Return: VALUE

  • Synopsis: my $name = $account->name;

properties

Returns the raw properties as a hash. This is the original return value of the web-api.

  • Return: HASH

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

is_blocked

Exposed property value.

  • Return: VALUE

  • Synopsis: my $is_blocked = $account->is_blocked;

email

Exposed property value.

  • Return: VALUE

  • Synopsis: my $email = $account->email;

domain

Returns the email-domain this account is attached to.

description

Exposed property value.

  • Return: VALUE

  • Synopsis: my $description = $account->description;

size

Exposed property value.

  • Return: VALUE

  • Synopsis: my $size = $account->size;

change

Changes the account

  • Parameter: %params - key => value description size

  • Synopsis: $account->change(description => 'authors account', size => 2000000 );

delete

Deletes the account api sided and sets this object invalid.

  • Synopsis: $account->delete;

delete

Deletes the account api sided and sets this object invalid.

  • Parameter: $password - new password

  • Synopsis: $account->change_password($password);

usage

Deletes the account api sided and sets this object invalid.

  • Return: HASH

  • Synopsis: $account->usage;

tasks

Get all associated tasks

  • Return: HASH

  • Synopsis: $account->tasks;