;
use Carp qw{ carp croak };
use List::Util 'first';
use LWP::UserAgent ();
use JSON ();
use Digest::SHA1 'sha1_hex';
# # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # #
# Class variables
my $UserAgent = LWP::UserAgent->new(timeout => 10);
my $Json = JSON->new->allow_nonref;
my @accessRuleMethods = qw{ GET POST PUT DELETE };
# End - Class vari
e 'get' and $method ne 'delete')
{
$body = $Json->encode($params{'body'});
$httpHeaders{'Content-type'} = 'application/json';
$content{'Content'} = $body;
}
unles
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $projects = $ovh->cloud->projects;
my $example_project = $projects->[
o subnet methods.
=head1 METHODS
=cut
use strict;
use warnings;
use Carp qw{ carp croak };
use JSON;
our $VERSION = 0.48;
=head2 _new_existing
Internal Method to create the Subnet object.
This m
? JSON::true : JSON::false;
my $no_gateway = $params{noGateway} && ( $params{no_gateway} eq 'true' || $params{no_gateway} eq '1' || $params{no_gateway} eq 'yes' ) ? JSON::true : JSON::false;
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $info = $ovh->hosting->web->free_email_info;
=head1 DESCRIPTION
Only He
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $contacts = $ovh->me->contacts;
foreach my $contact (@$contact)
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $order = $ovh->me->order(1234);
my $order->pay_with_registered_p
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $bills = $ovh->me->bills;
foreach my $bill (@$bills) {
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $cart = $ovh->order->new_cart(ovh_subsidiary => 'DE');
$cart->ad
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $projects = $ovh->cloud->projects;
my $example_project = $projects->[
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $task = $ovh->domain->service->change_contact(contact_billing => 'ovhacco
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $available_domains = $ovh->order->domain->zone->existing;
=head1 DESCRIP
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $available_email_domains = $ovh->order->email->domain->available_services
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $service = $ovh->domain->service("mydomain.org");
my $info = $se
ed.
=head1 METHODS
=cut
use strict;
use warnings;
use Carp qw{ carp croak };
use DateTime;
use JSON;
our $VERSION = 0.48;
use Webservice::OVH::Helper;
use Webservice::OVH::Me::Contact;
=head2 _n
rams{renew}{automatic} eq 'yes' || $params{renew}{automatic} eq '1' ? JSON::true : JSON::false;
$options->{deleteAtExpiration} = $params{renew}{delete_at_expiration} eq 'true
qw{ carp croak };
use JSON ();
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Class variables
my $Json = JSON->new->allow_nonref;
# End -
'response'}->content };
}
eval { $content = $Json->decode($self->{'response'}->content); 1; } or do {
carp 'Failed to parse JSON content from the answer: ', $self->{'response'}->cont
<isSuccess|/isSuccess>.
It takes no parameter.
=head1 SEE ALSO
The guts of module are using: C<JSON>.
=head1 COPYRIGHT
Copyright (c) 2013, OVH SAS.
All rights reserved.
This library is distribut
=head1 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 $c
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $projects = $ovh->cloud->projects;
foreach my $project (@$project) {
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $email_domains = $ovh->email->domains->domains;
foreach my $emai
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $email_domains = $ovh->email->domain->domains;
foreach $email_do
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $services = $ovh->domain->services;
foreach my $service (@$services)
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $contacts = $ovh->me->contacts;
my $tasks_contact_change = $ovh->me->
=head1 SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $zone = $ovh->domain->zone("myzone.de");
my $a_record = $zone->n