NAME

Webservice::OVH::Email::Domain::Domain::Redirection

SYNOPSIS

    use Webservice::OVH;
    
    my $ovh = Webservice::OVH->new_from_json("credentials.json");
    
    my $email_domain = $ovh->email->domain->domain('testdomain.de');
    
    my $redirection = $email_domain->new_redirection(from => 'test@test.de', to => 'test2@test.de', local_copy => 'false');

DESCRIPTION

Provides the ability to create, delete and change redirections for an email-domain.

METHODS

_new_existing

Internal Method to create a Redirection object. This method should never be called directly.

  • Parameter: $api_wrapper - ovh api wrapper object, $module - root object, $domain - parent domain Objekt, $redirection_id => api intern id

  • Return: Webservice::OVH::Email::Domain::Domain::Redirection

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

_new

Internal Method to create the Redirection 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::Redirection

  • Synopsis: Webservice::OVH::Email::Domain::Domain::Redirection->_new($ovh_api_wrapper, $domain, $module, from => 'from@test.com', to => 'to@test.com', local_copy => 'false');

is_valid

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

  • Return: VALUE

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

id

Returns the api id.

  • Return: VALUE

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

domain

Returns the email-domain this redirection is attached to.

properties

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

  • Return: HASH

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

field_type

Exposed property value.

  • Return: VALUE

  • Synopsis: my $from = $record->from;

to

Exposed property value.

  • Return: VALUE

  • Synopsis: my $to = $record->to;

delete

Deletes the redirection api sided and sets this object invalid.

  • Synopsis: $redirection->delete;

change

Changes the redirection

  • Parameter: %params - key => value to

  • Synopsis: $redirection->change(to => 'test@test.de');

tasks

Get all associated tasks

  • Return: HASH

  • Synopsis: $mailinglist->tasks;